#include <Windows.h>
#include "CTradeActionPacket.h"

CTradeActionPacket::CTradeActionPacket(CChar * schar, unsigned long action) {

	this->type = 0x22;
	this->size = 0x08;
	memset(this->data, 0, sizeof(data));
	
	memcpy(this->data+0x04-0x04, &(schar->m_id), 4);
	memcpy(this->data+0x08-0x04, &(action), 4);

	unsigned short targId = schar->getTargId();
	memcpy(this->data+0x0C-0x04, &targId, 2);

}

CTradeActionPacket::~CTradeActionPacket() {

}